﻿@using AdverseEventReportSystem.BLL.ServiceReference1;
@{
    var user = ViewBag.User as tb_User;
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title></title>
    <link href="~/lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <link href="~/lib/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
    <link href="~/lib/ligerUI/skins/Gray/css/all.css" rel="stylesheet" type="text/css" />
    <link href="~/Content/css/common.css" rel="stylesheet" type="text/css" />
    <script src="~/lib/jquery/jquery-1.9.0.min.js" type="text/javascript"></script>
    <script src="~/lib/ligerUI/js/ligerui.all.js"></script>
    <script src="~/Scripts/common.js"></script>
</head>
<body>
    <div style="margin:10px 0px;">
        <table class="gridtable" style="width:500px;">
            <tr>
                <td style="text-align:right; width:100px;">
                    姓名：
                </td>
                <td>
                    <input type="text" id="txtUserName" class="l-text" style="width:120px;" value="@(user.UserName)" /><font style="color:red;">&nbsp;*</font>
                </td>
                <td style="text-align:right; width:100px;">
                    性别：
                </td>
                <td>
                    <select id="sex" style="width: 120px;">
                        <option @(user.Sex == "男" ? "selected" : "")>男</option>
                        <option @(user.Sex == "女" || user.Id == 0 ? "selected" : "")>女</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    工号：
                </td>
                <td>
                    <input type="text" id="txtUserId" class="l-text" style="width:120px;" value="@(user.UserId)" /><font style="color:red;">&nbsp;*</font>
                </td>
                <td style="text-align:right; width:100px;">
                    密码：
                </td>
                <td>
                    <input type="text" id="txtPassword" class="l-text" style="width:120px;" value="@(string.IsNullOrEmpty(user.Password) ? "123456" : user.Password)" /><font style="color:red;">&nbsp;*</font>
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    出生日期：
                </td>
                <td>
                    <input type="text" id="txtBirthday" class="l-text" style="width:120px;" value="@(user.Birthday)" />
                </td>
                <td style="text-align:right; width:100px;">
                    电话：
                </td>
                <td>
                    <input type="text" id="txtTelephone" class="l-text" style="width:120px;" value="@(user.Telephone)" />
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    角色：
                </td>
                <td>
                    <div style="float:left;padding-top:4px;"><input type="text" id="powerRole" class="l-text" style="width:120px;" value="@(user.PowerRole)" /></div><div style="float:left;"><font style="color:red;">&nbsp;*</font></div>
                </td>
                <td style="text-align:right; width:100px;">
                    专业：
                </td>
                <td>
                    <input type="text" id="txtMajor" class="l-text" style="width:120px;" value="@(user.Major)" />
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    IC卡号：
                </td>
                <td style="padding-top: 5px;">
                    <input type="text" id="txtICCode" class="l-text" style="width:120px;" value="@(user.ICCode)" />
                </td>
                <td style="text-align:right; width:100px;">
                    条码号：
                </td>
                <td>
                    <input type="text" id="txtBarCode" class="l-text" style="width:120px;" value="@(user.BarCode)" />
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    职务：
                </td>
                <td>
                    <div style="float:left;padding-top:4px;"><input type="text" id="jobCode" class="l-text" style="width:120px;" value="@(user.JobCode)" /></div><div style="float:left;"><font style="color:red;">&nbsp;*</font></div>
                </td>
                <td style="text-align:right; width:100px;">
                    职称：
                </td>
                <td>
                    <div style="float:left;padding-top:4px;"><input type="text" id="positionCode" class="l-text" style="width:120px;" value="@(user.PositionCode)" /></div><div style="float:left;"><font style="color:red;">&nbsp;*</font></div>
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    所属部门：
                </td>
                <td colspan="3">
                    <div style="float:left;margin-top:5px;"><input type="text" id="departmentCode"></div><div style="float:left;"><font style="color:red;">&nbsp;*</font></div>
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    备注：
                </td>
                <td colspan="3">
                    <div style="width:360px;">
                        <textarea id="txtRemarks" rows="3" class="l-textarea textarea-inherit" maxlength="500" style="padding:5px;margin-top:7px;">@(user.Remarks)</textarea>
                    </div>
                </td>
            </tr>
            <tr>
                <td style="text-align:right; width:100px;">
                    状态：
                </td>
                <td colspan="3">
                    <label for="rdoStatus1">
                        <input type="radio" id="rdoStatus1" name="status" value="0" @((user.Status == 0 || string.IsNullOrEmpty(user.Status.ToString())) ? "checked" : "") />&nbsp;正常
                    </label>&nbsp;&nbsp;
                    <label for="rdoStatus2">
                        <input type="radio" id="rdoStatus2" name="status" value="1" @(user.Status == 1 ? "checked" : "") />&nbsp;停用
                    </label>&nbsp;&nbsp;
                    <label for="rdoStatus3">
                        <input type="radio" id="rdoStatus3" name="status" value="2" @(user.Status == 2 ? "checked" : "") />&nbsp;其他
                    </label>
                </td>
            </tr>
            <tr>
                <td colspan="4" style="text-align:center;padding-top:10px;">
                    <input id="btnSubmit" type="button" value="确定" class="l-button" onclick="save()" />&nbsp;&nbsp;&nbsp;
                    <input id="btnCancel" type="button" value="取消" class="l-button-cancel" onclick="closeDialog()" />
                </td>
            </tr>
        </table>
        <input type="hidden" id="hdnId" value="@(user.Id)" />
        <input type="hidden" id="hdnDepartmentCodeValue" value="@(user.DepartmentCode)" />
    </div>
</body>
</html>
@{
    <script src="~/Areas/Sysbase/Scripts/EditUser.js"></script>
}